package com.jianying.mapper;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.jianying.base.BaseMapper;
import com.jianying.dataSource.TargetDataSource;
import com.jianying.domain.Purchase;

@Repository("purchaseMapper")
public class PurchaseMapper extends BaseMapper {
	
	private final static String NAME_SPACE = "com.jianying.mapper.PurchaseMapper.";

	@TargetDataSource(name="ds1")
	public void insert(Purchase purchase) {
		getSqlSessionTemplate().insert(NAME_SPACE + "insert", purchase);
	}
	
	public List<Purchase> byUuids(List<String> uuids){
		return getSqlSessionTemplate().selectList(NAME_SPACE + "byUuids", uuids);
	}
	
}
